package com.icode.dao;

import com.icode.core.dto.user.LoginDTO;
import com.icode.core.model.user.*;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sunk
 * Date: 14-12-26
 * Time: 下午3:45
 * To change this template use File | Settings | File Templates.
 */
public interface UserDao extends EntityDao {
    Customer findUserForLogin(LoginDTO loginDTO);

    void saveOrUpdateUsersInfo(UserInfo usersInfo);

    UserInfo findUsersInfoByPhoneNum(String phoneNum);

    List<UserInfo> findUsersInfoByUsername(String username);

    List<Province> findProvince();

    Province findProvinceById(String provinceId);

    List<City> findCityById(String provinceId);

    City findCityByCityId(String cityId);

    List<District> findDistrictById(String cityId);

    District findDistrictByDistrictID(String districtId);

    Customer findByPhoneNum(String phoneNum);

    Customer findCustomerByUsername(String username);

    Administrator findAdministratorByUsername(String username);

    UserInfo findUserInfoByUser(User user);

    UserInfo findUserInfoByUsername(String username,String userInfoGuid);

    void deleteObject(Object object);

    User findByUserName(String userName);

    boolean userNameIsExist(String userName);

    List<UserInfo> findAllUserInfo(String currentPage);

    List<UserInfo> findUserInfoByPhoneNumAndRealName(String phoneNum, String realName);

    void changeUserStatus(String phoneNum, String activate);

}
